/*继承按钮*/
function formatterInheritFun(value, row, index) {
	if (row.isHas2 == 0) {
		return '<button class="btn btn-primary " type="button" onclick="refreshInherit('
				+ "'"
				+ row.id
				+ "'"
				+ ')" ><i class="fa fa-paste"></i>继承验厂报告</button>';
	} else {
		return '已存在不允许继承';
	}
}
/*继承状态*/
function orderStatusFormatter(value, row, index) {
	if (row.isHas == 1) {
		return "<span style='color:red;'>"+value+"</span>";
	} else {
		return value;
	}
}
/**点击继承*/
function optionInheritTable(value) {

	if (value == 0) {
		$("#inherit").hide();
		$("#unInherit").show();
		$("#inheritTable").show();

		var orderNo = $("#order-no").val();
		$("#checkOrderNo").val(orderNo);
		var supplier = $("#supplier").val();
		tableRefresh(basePath+'/factoryinspection/getFactoryInspectionList2.do?supplier='+supplier);
	} else {
		$("#inherit").show();
		$("#unInherit").hide();
		$("#inheritTable").hide();
	}

}
/**刷新要继承的表*/
function refreshIF() {
	var orderNo = $("#order-no").val();
	$("#checkOrderNo").val(orderNo);
	var supplier = $("#supplier").val();
	tableRefresh(basePath+'/factoryinspection/getFactoryInspectionList2.do?supplier='+ supplier);
}